from fastapi import status
from fastapi.requests import Request
from fastapi.responses import JSONResponse

async def appExceptionHandler(request: Request, exc: Exception):
    """自定义全局系统错误"""
    return JSONResponse(
        content={"code": 500, "message": str(exc)},
        status_code=status.HTTP_200_OK,
    )